<template>
  <div class="">
    <div class="login">
      <div class="header">
        <div class="icon"><img src="@/assets/imgs/badge.png" alt="" /></div>
        <div class="title">军事科学院研究生院</div>
      </div>
      <div class="login-form">
        <div class="title">欢迎登录</div>
        <div class="loging">
          <span>已有账号？</span>
          <span><a href="javascript:;" @click="loginShow = true">登录</a></span>
        </div>
        <el-form
          label-width="70px"
          :model="loginForm"
          style="margin-top: 70px"
          class="form"
        >
          <el-form-item label="姓名">
            <el-input v-model="loginForm.name"></el-input>
          </el-form-item>
          <el-form-item label="手机号">
            <el-input v-model="loginForm.phone"></el-input>
          </el-form-item>
          <el-form-item label="密码">
            <el-input v-model="loginForm.password" show-password></el-input>
          </el-form-item>
          <el-form-item label="确认密码">
            <el-input v-model="loginForm.unpassword" show-password></el-input>
          </el-form-item>
          <el-form-item label="验证码">
            <el-input v-model="loginForm.type" style="width: 236px"></el-input>
            <el-button type="primary">获取验证码</el-button>
          </el-form-item>
        </el-form>
        <el-button type="primary" round class="but">注册</el-button>
      </div>
    </div>
    <el-dialog :visible.sync="loginShow" width="720px" class="dialog">
      <el-tabs v-model="activeName">
        <el-tab-pane label="账号登录" name="first">
          <div class="login-form">
            <el-input
              placeholder="请输入您的手机号"
              style="margin-top: 20px"
            ></el-input>
            <el-input placeholder="请输入您的密码" show-password></el-input>
            <div class="code">
              <el-input placeholder="请输入验证码"></el-input>
              <div class="code-img"></div>
              <a href="javascript:;" class="refresh">刷新</a>
            </div>

            <div class="forget"><a href="javascript:;">忘记密码？</a></div>
            <button class="logins">登录</button>
          </div>
        </el-tab-pane>
        <el-tab-pane label="短信登录" name="second">
          <div class="short">
            <div class="">
              <el-input
                placeholder="请输入您的手机号"
                style="margin-top: 20px"
              ></el-input>
            </div>
            <div class="phone">
              <el-input placeholder="请输入验证码"></el-input>
              <button class="obtain">获取验证码</button>
            </div>
            <button class="logins">登录</button>
          </div>
        </el-tab-pane>
      </el-tabs>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "login",
  data() {
    return {
      loginShow: false,
      activeName: "second",
      loginForm: {
        name: "",
        password: "",
        type: "",
        unpassword: "",
        phone: ""
      }
    };
  },
  methods: {}
};
</script>

<style lang="scss" scoped>
.login {
  min-height: 100vh;
  background: url(~@/assets/imgs/login.jpg) no-repeat;
  background-size: 100% 100%;
  display: flex;
  justify-content: space-between;
  .header {
    display: flex;
    img {
      width: 77px;
      height: 78px;
      margin: 50px 0 0 50px;
    }
    .title {
      width: 300px;
      height: 32px;
      font-family: Source Han Sans CN;
      font-weight: 700;
      color: #ffffff;
      font-size: 32px;
      line-height: 32px;
      margin: 72px 0 0 20px;
    }
  }
  .login-form {
    width: 580px;
    height: 780px;
    background: rgba(#fff, 0.9);
    margin: 100px 180px 0 0;
    padding: 70px 70px 0;
    border-radius: 5px;
    .title {
      font-weight: 700;
      color: #000000;
      font-size: 30px;
    }
    .loging > span:nth-child(1) {
      color: #666666;
      font-size: 14px;
    }
    .loging > span:nth-child(2) a {
      color: #dd1d20;
      font-size: 14px;
    }
    .form {
      .el-input {
        border-radius: 5px;
        box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.16);
      }
      >>> .el-input__inner:focus {
        border-color: #dd1d20;
      }
      .el-button--primary {
        background-color: #dd1d20;
        border: #dd1d20;
        margin-left: 20px;
      }
    }
    .but {
      width: 400px;
      height: 55px;
      font-size: 20px;
      font-weight: 700;
      background-color: #dd1d20;
      border-radius: 27px;
      margin-left: 22px;
      margin-top: 80px;
    }
    .el-button--primary {
      background-color: #dd1d20;
      border: #dd1d20;
    }
  }
}
.dialog {
  >>> .el-tabs__item {
    font-weight: 700;
    color: #000000;
    font-size: 20px;
  }
  >>> .el-tabs__item:hover {
    color: #dd1d20;
  }
  >>> .el-tabs__item.is-active {
    color: #dd1d20;
  }
  >>> .el-tabs__active-bar {
    background: #dd1d20;
  }
  >>> .el-tabs__nav-wrap::after {
    display: none;
  }
  >>> .el-input__inner:focus {
    border-color: #dd1d20;
    outline: 0;
  }
  .login-form {
    padding: 0 80px 0 80px;

    >>> .el-input__inner {
      font-size: 20px;
      margin-bottom: 20px;
      width: 520px;
      height: 50px;
      background-color: #ffffff;
      border-radius: 5px;
      box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.16);
    }
    .code {
      display: flex;
      position: relative;
      .el-input {
        width: 300px;
      }
      >>> .el-input__inner {
        margin-bottom: 20px;
        width: 300px;
        height: 50px;
        background-color: #ffffff;
        border-radius: 5px;
        box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.16);
      }
      .code-img {
        width: 200px;
        height: 50px;
        border: 1px solid #000;
        border-radius: 5px;
        box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.16);
        margin-left: 20px;
      }
      .refresh {
        position: absolute;
        right: -40px;
        top: 15px;
        color: #b21315;
        font-size: 14px;
      }
    }
    .forget {
      a {
        color: #b21315;
        font-size: 14px;
        font-weight: 700;
      }
    }
    .logins {
      font-weight: 700;
      margin: 50px 0 40px 100px;
      color: #ffffff;
      font-size: 22px;
      width: 328px;
      height: 56px;
      background-color: #b21315;
      border-radius: 33px;
      text-align: center;
      outline: none;
      border: none;
    }
    .text {
      color: #333333;
      font-size: 22px;
      line-height: 18px;
      display: block;
      text-align: right;
      margin-right: -60px;
    }
  }
  .short {
    padding: 0 80px 0 80px;
    >>> .el-input__inner {
      font-size: 20px;
      margin-bottom: 20px;
      width: 520px;
      height: 50px;
      background-color: #ffffff;
      border-radius: 5px;
      box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.16);
    }
    .phone {
      .el-input {
        width: 300px;
      }
      >>> .el-input__inner {
        margin-bottom: 20px;
        width: 300px;
        height: 50px;
        background-color: #ffffff;
        border-radius: 5px;
        box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.16);
      }
    }
    .obtain {
      width: 200px;
      margin-left: 20px;
      height: 50px;
      background-color: #b21315;
      border-radius: 5px;
      box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.16);
      text-align: center;
      outline: none;
      border: none;
      color: #ffffff;
      font-size: 20px;
    }
    .logins {
      font-weight: 700;
      margin: 50px 0 40px 100px;
      color: #ffffff;
      font-size: 22px;
      width: 328px;
      height: 56px;
      background-color: #b21315;
      border-radius: 33px;
      text-align: center;
      outline: none;
      border: none;
    }
    .text {
      color: #333333;
      font-size: 22px;
      line-height: 18px;
      display: block;
      text-align: right;
      margin-right: -60px;
    }
  }
}
</style>
